/**
 * 
 * date : 2014.10
 * writer : young
 */

befor  = "#000000";

function init(){
	
	document.getElementById("btn").onclick = chk2;
	
}

function chk2() {
	var f = document.frm;
	
	
	var col ="#";
	for(i = 0; i<6; i++){
		var ran = Math.floor(Math.random()*15);
		if(ran == 10){
			col +="a";
		}
		else if(ran == 11){
			col +="b";
		}
		else if(ran == 12){
			col +="c";
		}
		else if(ran == 13){
			col +="d";
		}
		else if(ran == 14){
			col +="e";
		}
		else if(ran == 14){
			col +="f";
		}
		else{
			col +=ran;
		}
	}
	
	f.area.value = col;
	f.area.style.backgroundColor = col;
	f.area.style.color = befor;
	befor = col;
}
function chk() {
	
	var f = document.frm;
	var j=f.rdoClk.length;
	var ran = Math.floor(Math.random()* f.rdoClk.length);  
	for(i=0 ; i < j ; ++i){
		if(f.rdoClk[i].checked){
			f.area.style.backgroundColor = f.rdoClk[i].value;
			f.area.style.color = f.rdoClk[ran].value;
			
		}
	}
}
